package cn.genmer.test.security.designpatterns.singleton;

/**
 * @program: concurrency_practice
 * @description: 静态内部类 - 推荐用
 * @author: Genmer
 * @create: 2020-10-21 01:04
 **/
public class Singleton7 {
    // 这方式构造方法内容
    private Singleton7(){}

    private static class SingletonInstance{
        private static final Singleton7 INSTANCE = new Singleton7();
    }

    public static Singleton7 getInstance(){
        return SingletonInstance.INSTANCE;
    }
}
